﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using HNCDataSetTableAdapters;

public partial class UserControl_content_cate_product2 : System.Web.UI.UserControl
{
    CategoryTableAdapter cate = new CategoryTableAdapter();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int CateID = int.Parse(HttpContext.Current.Request.RequestContext.RouteData.Values["CateID"].ToString());

            DataTable dt1 = cate.GetCateByCateID(CateID);
            lblTitle.Text = FuntionHNC.GetLanguage(dt1.Rows[0]["Title"].ToString(), dt1.Rows[0]["Title_en"].ToString());

            DataTable dt = cate.GetCateByParentID(CateID);
            rptCate.DataSource = dt;
            rptCate.DataBind();
        }
    }

}